//
//  JHSAlterCodeViewController.m
//  JHSSweep
//  JHSMainColor [UIColor colorWithRed:116 / 255.0 green:191 / 255.0 blue:159 / 255.0 alpha:1.0]
//  Created by 卢春晖 on 2017/3/24. 修改密码界面视图
//  Copyright © 2017年 JHDS. All rights reserved.
//

#import "JHSAlterCodeViewController.h"

@interface JHSAlterCodeViewController ()

@end

@implementation JHSAlterCodeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor colorWithRed:116 / 255.0 green:191 / 255.0 blue:159 / 255.0 alpha:1.0];
    //添加文字Label
    UILabel *label = [[UILabel alloc]init];
    UIFont *font_regular = [UIFont fontWithName:@"Courier New" size:84];
    label.text = @"JHS";
    label.textColor = [UIColor whiteColor];
    label.font = font_regular;
    //label.font = [UIFont systemFontOfSize:45];
    [self.view addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.centerY.equalTo(self.view).offset(-130);
    }];

    //添加🔐的图片
    UIImageView *lockimg = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"lock"]];
    [self.view addSubview:lockimg];
    [lockimg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view).offset(30);
        make.centerY.equalTo(self.view).offset(-30);
        make.size.mas_offset(CGSizeMake(30, 30));
    }];
    //添加UITextField
    UITextField *lockField = [[UITextField alloc]init];
    [self.view addSubview:lockField];
    [lockField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(lockimg.mas_right).offset(20);
        make.right.equalTo(self.view).offset(-20);
        make.centerY.equalTo(lockimg.mas_centerY);
    }];
    //设置边框样式，只有设置了才会显示边框样式
    lockField.borderStyle = UITextBorderStyleNone;
    //当输入框没有内容时，水印提示 提示内容为password
    lockField.placeholder = @"请输入您的旧密码";
    //设置输入框内容的字体样式和大小
    lockField.font = [UIFont fontWithName:@"Arial" size:14.0f];
    //设置字体颜色
    lockField.textColor = [UIColor blackColor];
    //输入框中是否有个叉号，在什么时候显示，用于一次性删除输入框中的内容
    lockField.clearButtonMode = UITextFieldViewModeNever;
    //每输入一个字符就变成点 用语密码输入
    lockField.secureTextEntry = YES;
    //添加底部的白色线条
    UIImageView *wireView = [[UIImageView alloc]init];
    wireView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:wireView];
    [wireView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(lockimg.mas_left);
        make.right.equalTo(lockField.mas_right);
        make.top.equalTo(lockimg.mas_bottom).offset(5);
        make.height.mas_equalTo(1);
    }];

    //添加🔐的图片
    UIImageView *lockimg1 = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"lock"]];
    [self.view addSubview:lockimg1];
    [lockimg1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view).offset(30);
        make.centerY.equalTo(self.view).offset(30);
        make.size.mas_offset(CGSizeMake(30, 30));
    }];
    //添加UITextField
    UITextField *lockField1 = [[UITextField alloc]init];
    [self.view addSubview:lockField1];
    [lockField1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(lockimg1.mas_right).offset(20);
        make.right.equalTo(self.view).offset(-20);
        make.centerY.equalTo(lockimg1.mas_centerY);
    }];
    //设置边框样式，只有设置了才会显示边框样式
    lockField1.borderStyle = UITextBorderStyleNone;
    //当输入框没有内容时，水印提示 提示内容为password
    lockField1.placeholder = @"请输入您的新密码";
    //设置输入框内容的字体样式和大小
    lockField1.font = [UIFont fontWithName:@"Arial" size:14.0f];
    //设置字体颜色
    lockField1.textColor = [UIColor blackColor];
    //输入框中是否有个叉号，在什么时候显示，用于一次性删除输入框中的内容
    lockField1.clearButtonMode = UITextFieldViewModeNever;
    //每输入一个字符就变成点 用语密码输入
    lockField1.secureTextEntry = YES;
    //添加底部的白色线条
    UIImageView *wireView1 = [[UIImageView alloc]init];
    wireView1.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:wireView1];
    [wireView1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(lockimg1.mas_left);
        make.right.equalTo(lockField1.mas_right);
        make.top.equalTo(lockimg1.mas_bottom).offset(5);
        make.height.mas_equalTo(1);
    }];
    //修改密码
    UIButton *btn = [[UIButton alloc]init];
    [self.view addSubview:btn];
    btn.backgroundColor = [UIColor colorWithRed:83 / 255.0 green:191 / 255.0 blue:150 / 255.0 alpha:1.0];
    [btn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(lockimg.mas_left);
        make.right.equalTo(lockField.mas_right);
        make.top.equalTo(wireView1.mas_bottom).offset(20);
        make.height.mas_equalTo(30);
    }];
    [btn setTitle:@"修改密码" forState:UIControlStateNormal];
    

    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
